/**
 * 
 */
package com.feonix.designPattern.composite.sample;

/**
 * @CopyRight (c)1993-2017
 * @Project common_practice
 * @Comments 请输入该类的描述
 * @NameSpace com.feonix.designPattern.composite.sample
 * @Author Feonixzw
 * @CreateDate 2018年2月6日
 */
public abstract class Entry {

	public abstract String getName();

	public abstract int getSize();

	public Entry add(Entry entry) {
		throw new FileTreatmentException();
	}

	public void printList() {
		printList("");
	}

	protected abstract void printList(String prefix);

	public String toString() {
		return getName() + "(" + getSize() + ")";
	}

}
